package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TLandAssetsMapper;
import com.ruoyi.system.domain.TLandAssets;
import com.ruoyi.system.service.ITLandAssetsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 士地资产Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-13
 */
@Service("TLandAssetsServiceImpl")
public class TLandAssetsServiceImpl implements ITLandAssetsService 
{
    @Autowired
    private TLandAssetsMapper tLandAssetsMapper;


    public List<TLandAssets> getlandAssetsId(){
        List<TLandAssets> list = tLandAssetsMapper.selectTLandAssetsList(new TLandAssets());
        return list;
    }
    /**
     * 查询士地资产
     * 
     * @param id 士地资产主键
     * @return 士地资产
     */
    @Override
    public TLandAssets selectTLandAssetsById(Long id)
    {
        return tLandAssetsMapper.selectTLandAssetsById(id);
    }

    /**
     * 查询士地资产列表
     * 
     * @param tLandAssets 士地资产
     * @return 士地资产
     */
    @Override
    public List<TLandAssets> selectTLandAssetsList(TLandAssets tLandAssets)
    {
        return tLandAssetsMapper.selectTLandAssetsList(tLandAssets);
    }

    /**
     * 新增士地资产
     * 
     * @param tLandAssets 士地资产
     * @return 结果
     */
    @Override
    public int insertTLandAssets(TLandAssets tLandAssets)
    {
        tLandAssets.setCreateTime(DateUtils.getNowDate());
        return tLandAssetsMapper.insertTLandAssets(tLandAssets);
    }

    /**
     * 修改士地资产
     * 
     * @param tLandAssets 士地资产
     * @return 结果
     */
    @Override
    public int updateTLandAssets(TLandAssets tLandAssets)
    {
        tLandAssets.setUpdateTime(DateUtils.getNowDate());
        return tLandAssetsMapper.updateTLandAssets(tLandAssets);
    }

    /**
     * 批量删除士地资产
     * 
     * @param ids 需要删除的士地资产主键
     * @return 结果
     */
    @Override
    public int deleteTLandAssetsByIds(String ids)
    {
        return tLandAssetsMapper.deleteTLandAssetsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除士地资产信息
     * 
     * @param id 士地资产主键
     * @return 结果
     */
    @Override
    public int deleteTLandAssetsById(Long id)
    {
        return tLandAssetsMapper.deleteTLandAssetsById(id);
    }

    @Override
    public List<TLandAssets> selectTLandAssetsListByIds(String ids) {
        return tLandAssetsMapper.selectTLandAssetsListByIds(Convert.toStrArray(ids));
    }
}
